package mylab.properties;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;

public class JavaProperties {
	
	public static void main( String[] args )
    {
    	Properties prop = new Properties();
    	Properties prop2 = new Properties();
 
    	try {
            //load a properties file
    		prop.load(new FileInputStream("Resources/logins.properties"));
    		prop2.load(new FileInputStream("Resources/logins2.properties"));
 
            //get the property value and print it out
    		System.out.println(prop.toString());   		
    		System.out.println(prop2.toString());
    		
    		prop.putAll(prop2);
    		System.out.println(prop.toString());
    		
    		
    	} catch (IOException ex) {
    		ex.printStackTrace();
        }
 
    }

}
